﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Main.aspx.cs" Inherits="JieBooLaw.WebAdmin.Main" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Desktop</title>
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:XScript ID="XScript1" runat="server">
        <script type="text/javascript">
            var loadPage = function(tabPanel, item) {
                var tab = tabPanel.getItem(item.id);

                if (!tab) {
                    tab = tabPanel.add({
                        id: item.id,
                        title: item.text,
                        closable: true,
                        autoLoad: {
                            showMask: true,
                            url: item.href,
                            mode: "iframe",
                            maskMsg: "Loading " + item.href + "..."
                        },
                        listeners: {
                            update: {
                                fn: function(tab, cfg) {
                                    cfg.iframe.setHeight(cfg.iframe.getSize().height);
                                },
                                scope: this,
                                single: true
                            }
                        }
                    });
                }

                tabPanel.setActiveTab(tab);
            }
        
    </script>
    </ext:XScript>
</head>
<body>
    <form id="form1" runat="server">
    <ext:Viewport ID="Viewport1" runat="server">
        <Items>
            <ext:BorderLayout ID="BorderLayout1" runat="server">
                <North MarginsSummary="0 0 0 0">
                    <ext:Panel ID="btns" runat="server" Region="North" Split="true" MinHeight="40" MaxHeight="85"
                        Margins="0 0 0 0" BaseCls="x-plain" Height="50" Layout="Fit">
                        <Items>
                            <ext:Panel ID="Panel2" runat="server" BaseCls="x-plain">
                                <Content>
                                    <div style="float: left;">
                                        <img src="images/logo.jpg" /></div>
                                    <div style="float: right; margin: 5px;">
                                        <ext:Button ID="btnSubmit" runat="server" Text="Sign out" Icon="LockOpen">
                                            <DirectEvents>
                                                <Click OnEvent="btnSignout_Click">
                                                    <EventMask ShowMask="true" Msg="Wating..." MinDelay="500" />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                    </div>
                                    <div style="float: right; margin: 6px;">
                                        <ext:Label ID="Label1" runat="server" Text="Logged in as">
                                        </ext:Label>
                                        <b>
                                            <ext:Label ID="Logged" runat="server">
                                            </ext:Label>
                                        </b>
                                    </div>
                                </Content>
                            </ext:Panel>
                        </Items>
                    </ext:Panel>
                </North>
                <West Collapsible="true" Split="true" MinWidth="175" MaxWidth="400" MarginsSummary="0 0 5 5"
                    CMarginsSummary="5 5 5 5">
                    <ext:Panel ID="WestPanel" runat="server" Title="菜单栏 " Width="225" Layout="Fit" Icon="ApplicationEdit">
                        <Items>
                            <ext:Panel ID="Panel1" runat="server" Layout="Accordion" Split="true" Margins="5 0 5 5"
                                Border="false">
                                <Items>
                                    <ext:MenuPanel ID="MenuPanel1" runat="server" Title="信息发布" Icon="ApplicationForm">
                                        <Menu ID="Menu1" runat="server">
                                            <Items>
                                                <ext:MenuItem ID="MenuItem1" runat="server" Text="新闻管理" Icon="Table" Href="ReleaseInfo.aspx">
                                                    <Listeners>
                                                        <Click Handler="if(this.href) { e.stopEvent(); loadPage(#{tabContent}, this); }" />
                                                    </Listeners>
                                                </ext:MenuItem>
                                                <ext:MenuItem ID="MenuItem2" runat="server" Text="栏目管理" Icon="Table" Href="ReleaseItem.aspx">
                                                    <Listeners>
                                                        <Click Handler="if(this.href) { e.stopEvent(); loadPage(#{tabContent}, this); }" />
                                                    </Listeners>
                                                </ext:MenuItem>
                                            </Items>
                                        </Menu>
                                    </ext:MenuPanel>
                                    <ext:MenuPanel ID="MenuPanel2" runat="server" Title="系统管理" Icon="ApplicationForm">
                                        <Menu ID="Menu2" runat="server">
                                            <Items>
                                                <ext:MenuItem ID="MenuItem4" runat="server" Text="用户管理" Icon="Table" Href="UserManager.aspx">
                                                    <Listeners>
                                                        <Click Handler="if(this.href) { e.stopEvent(); loadPage(#{tabContent}, this); }" />
                                                    </Listeners>
                                                </ext:MenuItem>
                                                <ext:MenuItem ID="MenuItem5" runat="server" Text="角色管理" Icon="Table" Href="RoleManager.aspx">
                                                    <Listeners>
                                                        <Click Handler="if(this.href) { e.stopEvent(); loadPage(#{tabContent}, this); }" />
                                                    </Listeners>
                                                </ext:MenuItem>
                                            </Items>
                                            <Listeners>
                                                <Click Handler="e.stopEvent();" />
                                            </Listeners>
                                        </Menu>
                                    </ext:MenuPanel>
                                    <ext:MenuPanel ID="MenuPanel3" runat="server" Title="基础维护" Icon="ApplicationForm">
                                        <Menu ID="Menu3" runat="server">
                                            <Items>
                                                <ext:MenuItem ID="MenuItem3" runat="server" Text="系统日志" Icon="Table" Href="SystemLog.aspx">
                                                    <Listeners>
                                                        <Click Handler="if(this.href) { e.stopEvent(); loadPage(#{tabContent}, this); }" />
                                                    </Listeners>
                                                </ext:MenuItem>
                                            </Items>
                                        </Menu>
                                    </ext:MenuPanel>
                                </Items>
                            </ext:Panel>
                        </Items>
                    </ext:Panel>
                </West>
                <Center MarginsSummary="5 5 5 0">
                    <ext:TabPanel ID="tabContent" runat="server" ActiveTabIndex="0" Title="TabPanel">
                        <Items>
                            <ext:Panel ID="Panel4" runat="server" Title="首页" Layout="Fit" Icon="ApplicationHome">
                                <Items>
                                    <ext:Image runat="server" ID="Image1" ImageUrl="images/helpBackground.jpg">
                                    </ext:Image>
                                </Items>
                            </ext:Panel>
                        </Items>
                    </ext:TabPanel>
                </Center>
                <South MarginsSummary="0 0 0 0">
                    <ext:StatusBar ID="StatusBar4" CtCls="word-status" runat="server" DefaultText="All rights reserved.">
                        <Items>
                            <ext:ToolbarTextItem ID="ToolbarTextItem1" runat="server" Text="Last login time:" />
                            <ext:ToolbarTextItem ID="txtLastLoginTime" runat="server" />
                            <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server" />
                            <ext:ToolbarTextItem ID="ToolbarTextItem2" runat="server" Text="Current time:" />
                            <ext:ToolbarTextItem ID="clock" runat="server" />
                        </Items>
                    </ext:StatusBar>
                </South>
            </ext:BorderLayout>
        </Items>
    </ext:Viewport>
    <ext:TaskManager ID="TaskManager1" runat="server">
        <Tasks>
            <ext:Task AutoRun="true" Interval="1000">
                <Listeners>
                    <Update Handler="#{clock}.setText(new Date().format('g:i:s A'));" />
                </Listeners>
            </ext:Task>
        </Tasks>
    </ext:TaskManager>
    </form>
</body>
</html>
